package com.atguigu.gulimall.cart.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.cart.feign.fallback.ProductFeignServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @create: 2024/9/8
 * @author: gyhe10
 * @description:
 **/

@FeignClient(value = "gulimall-product", fallback = ProductFeignServiceFallback.class)
public interface ProductFeignService {

    @GetMapping("/product/skuinfo/info/{skuId}")
    R getSkuInfo(@PathVariable("skuId") Long skuId);

    @GetMapping("/product/skusaleattrvalue/stringlist/{skuId}")
    R getSkuSaleAttrValuesBySkuId(@PathVariable("skuId") Long skuId);

    @GetMapping("/product/skuinfo/getSkuPricesBySkuIdList")
    Map<Long, BigDecimal> getSkuPricesBySkuIdList(@RequestParam("skuIdList") List<Long> skuIdList);
}
